#include "MEFComponent.h"
#include "MEFPlugin.h"

CMEFComponent::CMEFComponent(CMEFPlugin* aPlugin) : iPlugin(aPlugin), iX(0), iY(0), iZ(0), iLocX(0), iLocY(0), iLocZ(0)
{
}

CMEFComponent::~CMEFComponent()
{
}

void CMEFComponent::SetLocalPos(int aX, int aY, int aZ)
{
	iX = iLocX = aX;
	iY = iLocY = aY;
	iZ = iLocZ = aZ;
}

void CMEFComponent::UpdateToComponent(const CMEFComponent& aComponent)
{
	iX = iLocX + aComponent.iX;
	iY = iLocY + aComponent.iY;
	iZ = iLocZ + aComponent.iZ;
}

int CMEFComponent::X() const
{
	return iX;
}

int CMEFComponent::Y() const
{
	return iY;
}

int CMEFComponent::Z() const
{
	return iZ;
}

void CMEFComponent::SetLocalX(int aX)
{
	iX = iLocX = aX;
}

void CMEFComponent::SetLocalY(int aY)
{
	iY = iLocY = aY;
}

void CMEFComponent::SetLocalZ(int aZ)
{
	iZ = iLocZ = aZ;
}

CMEFPlugin* CMEFComponent::Plugin()
{
	return iPlugin;
}